<!DOCTYPE html>
<html>

	<head>
	<meta charset="utf-8">
<meta name="author" content="Yingruan" />
<meta content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1,user-scalable=0" name="viewport" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="renderer" content="webkit" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta content="telephone=no" name="format-detection" />
<meta name="apple-mobile-web-app-title" content="foodie">
<link rel="stylesheet" href="css/common.css" />
<script type='text/javascript' src='js/jquery.js?003'></script>
<script type='text/javascript' src='js/function.js?003'></script>
<script type='text/javascript' src='js/vue.min.js?003'></script>
<script type='text/javascript' src='js/jquery-weui/jquery-weui.js'></script>
<link rel="stylesheet" href="js/jquery-weui/jquery-weui.css" />
<link rel="stylesheet" href="js/jquery-weui/weui.min.css" />
<style>
	.weui-dialog__hd{ padding: 0; }
</style>
	</head>

	<body>
		<header class="bg-fff">
			<div onclick="back()" class="pad-l-12 pad-r-20 back "><div class="mag-t-15 mag-b-15"></div></div>
			<div class="fiex1 center f-20 title"></div>
		</header>
		<script type="text/javascript">
			document.addEventListener('plusready',plusReady,false);
			function plusReady() {
				alert()
				
				var jum_src = getUrlParam2("src");
				var ws = null,
					embed = null;
				ws = plus.webview.currentWebview();
				setTimeout(function(){
					ws.addEventListener('show', createEmbed(), false);
				},100)
				// 创建子Webview
				function createEmbed() {
					var topoffset = '45px';
					if(plus.navigator.isImmersedStatusbar()) { // 兼容immersed状态栏模式
						topoffset = (Math.round(plus.navigator.getStatusbarHeight()) + 45) + 'px';
					}
					plus.nativeUI.showWaiting('', {
						style: 'black',
						modal: false,
						background: 'rgba(0,0,0,0)'
					});
					embed = plus.webview.create(jum_src, 'embed', {
						top: topoffset,
						bottom: '0px',
						position: 'dock',
						dock: 'bottom',
						bounce: 'vertical'
					});
					ws.append(embed);
					embed.addEventListener('loaded', function() {
						plus.nativeUI.closeWaiting();
					}, false);
					embed.addEventListener('loading', function() {
						plus.nativeUI.showWaiting('', {
							style: 'black',
							modal: false,
							background: 'rgba(0,0,0,0)'
						});
					}, false);
				}
				// 打开网址
				function openUrl() {
					var url = document.getElementById("url");
					embed.loadURL(url.value);
					url.blur();
				}
				// 页面加载后自动打开
				document.addEventListener("DOMContentLoaded", function() {
					if(embed) {
						openUrl();
					} else {
						auto = true;
					}
				}, false);
				// 页面跳转完成事件
				function onBrowserLoading() {
					document.getElementById("url").value = embed.getURL();
				}
			}
		</script>
	</body>

</html>
